Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Un fulmine sulla scrivania, Corsair Sabre v2 Pro ridefinisce la velocità nel gaming
Un fulmine sulla scrivania, Corsair Sabre v2 Pro ridefinisce la velocità nel gaming
Questo mouse ultraleggero, con soli 36 grammi di peso, è stato concepito per offrire un'esperienza di gioco di alto livello ai professionisti degli FPS, grazie al polling rate a 8.000 Hz e a un sensore ottico da 33.000 DPI. La recensione esplora ogni dettaglio di questo dispositivo di gioco, dalla sua agilità estrema alle specifiche tecniche che lo pongono un passo avanti
Nokia Innovation Day 2025: l’Europa ha bisogno di campioni nelle telecomunicazioni
Nokia Innovation Day 2025: l’Europa ha bisogno di campioni nelle telecomunicazioni
Dal richiamo di Enrico Letta alla necessità di completare il mercato unico entro il 2028 alla visione di Nokia sul ruolo dell’IA e delle reti intelligenti, il Nokia Innovation Day 2025 ha intrecciato geopolitica e tecnologia, mostrando a Vimercate come la ricerca italiana contribuisca alle sfide globali delle telecomunicazioni
Sottile, leggero e dall'autonomia WOW: OPPO Reno14 F conquista con stile e sostanza
Sottile, leggero e dall'autonomia WOW: OPPO Reno14 F conquista con stile e sostanza
OPPO Reno14 F 5G si propone come smartphone di fascia media con caratteristiche equilibrate. Il device monta processore Qualcomm Snapdragon 6 Gen 1, display AMOLED da 6,57 pollici a 120Hz, tripla fotocamera posteriore con sensore principale da 50MP e generosa batteria da 6000mAh con ricarica rapida a 45W. Si posiziona come alternativa accessibile nella gamma Reno14, proponendo un design curato e tutto quello che serve per un uso senza troppe preoccupazioni.
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


Un fulmine sulla scrivania, Corsair Sabre v2 Pro ridefinisce la velocità nel gaming Un fulmine sulla scrivania, Corsair Sabre v2 Pro...
Nokia Innovation Day 2025: l’Europa ha bisogno di campioni nelle telecomunicazioni Nokia Innovation Day 2025: l’Europa ha bisogno d...
Sottile, leggero e dall'autonomia WOW: OPPO Reno14 F conquista con stile e sostanza Sottile, leggero e dall'autonomia WOW: OPPO Reno...
Destiny Rising: quando un gioco mobile supera il gioco originale Destiny Rising: quando un gioco mobile supera il...
Plaud Note Pro convince per qualità e integrazione, ma l’abbonamento resta un ostacolo Plaud Note Pro convince per qualità e int...
HUAWEI, tutte le novità dell'even...
Mercedes GenH2 Truck sulle Alpi: oltre 1...
Shadow Leak: ecco come ChatGPT poteva es...
Google Gemini 2.5 batte quasi tutti gli ...
Battlefield 6: i giocatori console non p...
Iliad rinnova l'offerta mobile: tre pian...
HUAWEI Watch GT 6 ufficiale: design al t...
Reggie Townsend di SAS: l’etica dell’IA ...
Startup Marathon in vista del traguardo:...
Xiaomi 15T Series: basta un clic per ott...
Star Citizen diventa pay-to-win? L'ira d...
Borderlands 4: Gearbox punta a migliorar...
Sunseeker V3 Plus in offerta su Amazon: ...
Italia pronta alla guerra digitale: hack...
Serie Xiaomi 17 in arrivo già a f...
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: 16:15.


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