Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Recensione HONOR Magic V6: spessore record e super batteria. È lui il fold da battere?
Recensione HONOR Magic V6: spessore record e super batteria. È lui il fold da battere?
HONOR Magic V6 è arrivato in Italia a 2.299,90 euro con una promessa precisa: unire 4 mm di spessore da aperto (8,75 mm chiuso nel modello White, 9 mm negli altri colori) a una batteria da 6.660 mAh, la più capiente mai vista su un pieghevole. Lo abbiamo usato per oltre una settimana in versione Red 16/512 GB per capire se lo Snapdragon 8 Elite Gen 5 tiene testa alla concorrenza anche fuori dai benchmark ufficiali
Redmi Pad 2 9.7: ampio display, economico e peso contenuto, ma qualche limite nelle prestazioni
Redmi Pad 2 9.7: ampio display, economico e peso contenuto, ma qualche limite nelle prestazioni
Redmi Pad 2 9.7 punta su un display ampio e fluido, una batteria capace di accompagnare l'uso quotidiano senza ansie da ricarica e un prezzo accessibile, a partire da 179,90 euro per la versione con 64 GB di storage. Lo Snapdragon 6s 4G Gen 2 e i 4 GB di RAM della configurazione più diffusa frenano però chi cerca reattività e multitasking spinto: ecco il bilancio dopo due settimane di prova diretta
Peugeot Polygon Concept: ecco il futuro delle utilitarie
Peugeot Polygon Concept: ecco il futuro delle utilitarie
Polygon è la concept car di Peugeot che mostra il futuro delle soluzioni del segmento B: tra design compatti e innovativi affiancati da dimensioni compatte uno scherzo dalla manovrabilità incredibile per le manovre a bassa velocità
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 07-07-2005, 17:39   #1
tylerdurden83
Senior Member
 
Iscritto dal: Nov 2004
Messaggi: 691
[Open-GL]un paio di quesiti su opengl....

Ciao a tutti! Ho bisogno di un aiuto per quanto riguarda opengl. Avrei bisogno di sapere come poter visualizzare un immagine di sfondo, e come poter far si che dei punti mi vengano disegnati non tutti insieme ma, diciamo, per linee. Se non sono stato chiaro chiedetemi pure!
Grazie 1000 a tutti uqelli che mi aiuteranno!!!
tylerdurden83 è offline   Rispondi citando il messaggio o parte di esso
Old 08-07-2005, 08:20   #2
DanieleC88
Senior Member
 
L'Avatar di DanieleC88
 
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
Per lo sfondo, mi sa che devi usare ripetute chiamate a glRasterPos*() e glBitmap*() per disegnare lo sfondo. Il secondo dubbio non l'ho capito.
__________________

C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai!
DanieleC88 è offline   Rispondi citando il messaggio o parte di esso
Old 08-07-2005, 11:38   #3
tylerdurden83
Senior Member
 
Iscritto dal: Nov 2004
Messaggi: 691
nelle parentesi devo mettere l'immagine che voglio visualizzare?
ti spiego il secondo. diciamo che voglio far comparire uno sfondo e su questo sfondo andare a disegnare dei punti colorati random, mi interesserebbe far si che appaiano per righe invece che tutti insieme, un po come farebbe una stampante diciamo.
tylerdurden83 è offline   Rispondi citando il messaggio o parte di esso
Old 08-07-2005, 15:10   #4
DanieleC88
Senior Member
 
L'Avatar di DanieleC88
 
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
Quote:
Originariamente inviato da OpenGL: The red book
The Current Raster Position
The current raster position is the origin where the next bitmap (or image) is to be drawn. In the F example, the raster position was set using glRasterPos*() to (20, 20), which is where the lower left corner of the F was drawn:

glRasterPos2i(20, 20);

void glRasterPos{234}{sifd}{v}(TYPE x, TYPE y, TYPE z, TYPE w);

Sets the current raster position. The x, y, z, and w arguments specify the coordinates of the raster position. If glRasterPos2*() is used, z is implicitly set to zero and w is implicitly set to one; similarly, with glRasterPos3*(), w is set to one.

The coordinates of the raster position are transformed to screen coordinates in exactly the same way as coordinates supplied with a glVertex*() command (that is, with the modelview and perspective matrices). After transformation, they either define a valid spot in the window on the screen, or they're clipped out because the transformed coordinates lie outside the viewport. If the transformed point is clipped out, the current raster position is invalid.

To obtain the current raster position, you can use the query command glGetFloatv() with GL_CURRENT_RASTER_POSITION as the first argument. The second argument should be a pointer to an allocated array that can hold the (x, y, z, w) values as floating-point numbers. Call glGetBooleanv() with GL_CURRENT_RASTER_POSITION_VALID as the first argument to determine whether the current raster position is valid.
Quote:
Originariamente inviato da OpenGL: The red book
Drawing the Bitmap
Once you've set the desired raster position, you probably want to use the glBitmap() command to draw the data. void glBitmap(GLsizei width, GLsizei height, GLfloat xbo, GLfloat ybo, GLfloat xbi, GLfloat ybi, const GLubyte *bitmap);

Draws the bitmap specified by bitmap, which is a pointer to the bitmap image. The origin of the bitmap is placed at the most recently defined current raster position. If the current raster position is invalid, nothing is drawn, and the raster position remains invalid. The width and height arguments indicate the width and height, in pixels, of the bitmap. The width need not be a multiple of 8, although the data is stored in unsigned characters of 8 bits each. (In the F example, it wouldn't matter if there were garbage bits in the data beyond the tenth bit; since glBitmap() was called with a width of 10, only 10 bits of the row are rendered.) Use xbo and ybo to define the origin of the bitmap (positive values move the origin up and to the right; negative values move it down and to the left); xbi and ybi indicate the x and y increments that are added to the raster position after the bitmap is rasterized (see Figure 8-2 ).

[IMAGE]

Figure 8-2 : A Bitmap and Its Associated Parameters



Allowing the origin of the bitmap to be placed arbitrarily makes it easy for characters to extend below the origin (typically used for characters with descenders, such as g, j, and y), or to extend beyond the left of the origin (used for various swash characters, which have extended flourishes, or for characters in fonts that lean to the left).

After the bitmap is drawn, the current raster position is advanced by xbi and ybi in the x- and y-directions, respectively. For standard Latin fonts, ybi is typically 0.0 and xbi is positive (since successive characters are drawn from left to right). For Hebrew, where characters go from right to left, the xbi values would typically be negative. Fonts that draw successive characters vertically in columns would use zero for xbi and nonzero values for ybi. In Figure 8-2 , each time the F is drawn, the current raster position advances by 12 pixels, allowing a 2-pixel space between successive characters.

Since xbo, ybo, xbi, and ybi are floating-point values, characters need not be an integral number of pixels wide. Actual characters are drawn on exact pixel boundaries, but the current raster position is kept in floating point so that each character is drawn as close as possible to where it belongs. For example, if the code in the F example was modified so that xbi is 11.5 instead of 12, and if more characters were drawn, the space between letters would alternate between one and two pixels, giving the best approximation to the requested 1.5-pixel space. Note that bitmaps can't be used for rotatable fonts because the bitmap is always drawn aligned to the x and y framebuffer axes.
Per i punti, devi disegnarli uno ad uno con un intervallo.
__________________

C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai!
DanieleC88 è offline   Rispondi citando il messaggio o parte di esso
Old 11-07-2005, 15:50   #5
DanieleC88
Senior Member
 
L'Avatar di DanieleC88
 
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
Dimenticavo: http://www.opengl.org/documentation/red_book_1.0/
__________________

C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai!
DanieleC88 è offline   Rispondi citando il messaggio o parte di esso
Old 11-07-2005, 15:54   #6
tylerdurden83
Senior Member
 
Iscritto dal: Nov 2004
Messaggi: 691
grazie 100000000 adesso me lo studio!!!
tylerdurden83 è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Recensione HONOR Magic V6: spessore record e super batteria. È lui il fold da battere? Recensione HONOR Magic V6: spessore record e sup...
Redmi Pad 2 9.7: ampio display, economico e peso contenuto, ma qualche limite nelle prestazioni Redmi Pad 2 9.7: ampio display, economico e peso...
Peugeot Polygon Concept: ecco il futuro delle utilitarie Peugeot Polygon Concept: ecco il futuro delle ut...
Reno16 Pro: il compatto di OPPO punta su fotocamera da 200MP e il nuovo Bubble! La recensione Reno16 Pro: il compatto di OPPO punta su fotocam...
 Hisense 55U7SE: tuttofare e accessibile, il MiniLED per film, sport e gioco Hisense 55U7SE: tuttofare e accessibile, il Min...
SBS annuncia la nuova gamma Laptop con t...
Gli italiani sono interessati alla sicur...
Galaxy Watch 9, chip più veloce f...
Steam ha appena chiuso un semestre molto...
I nuovi iPhone 18 Pro potrebbero essere ...
Huawei realizzerà chip di nuova g...
La JAXA ha eseguito un test del prototip...
Netflix, ritorna la prova gratuita per i...
Il satellite LINK per salvare il telesco...
Il nuovo iPhone 18 Pro Max costerà...
Il tredicesimo volo del razzo spaziale S...
Pagare il parcheggio è sempre pi&...
Torvalds: 'Non sono più un progra...
Xiaomi lavora alla nuova Smart Band 11, ...
Inabissato in Grecia, iPhone 16 Pro sopr...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 06:38.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v