Click here to Skip to main content
15,891,253 members
Home / Discussions / Graphics
   

Graphics

 
QuestionHow i can improve this website Pin
Saqib Yaqub24-Feb-08 4:19
Saqib Yaqub24-Feb-08 4:19 
AnswerRe: How i can improve this website http://www.whites-stationery.co.uk/ Pin
Pete O'Hanlon24-Feb-08 10:11
mvePete O'Hanlon24-Feb-08 10:11 
GeneralRe: How i can improve this website http://www.whites-stationery.co.uk/ Pin
Saqib Yaqub24-Feb-08 11:19
Saqib Yaqub24-Feb-08 11:19 
GeneralRe: How i can improve this website http://www.whites-stationery.co.uk/ Pin
Tim Craig24-Feb-08 12:47
Tim Craig24-Feb-08 12:47 
GeneralRe: How i can improve this website http://www.whites-stationery.co.uk/ Pin
Pete O'Hanlon25-Feb-08 0:49
mvePete O'Hanlon25-Feb-08 0:49 
AnswerRe: How i can improve this website Pin
Christian Graus25-Feb-08 9:42
protectorChristian Graus25-Feb-08 9:42 
GeneralRe: How i can improve this website Pin
Pete O'Hanlon25-Feb-08 9:56
mvePete O'Hanlon25-Feb-08 9:56 
GeneralOpenGL- Tao- VB.Net simulating motion and zoom Pin
braveheartkenya24-Feb-08 4:11
braveheartkenya24-Feb-08 4:11 
Hi,

I'm new to openGL programming. I'm trying to simulate motion and zooming in and out in an SimpleOpenGLControl from the Tao Framework. <so you="ll need to install the framework and put in a reference in Visual Studio to " tao=" in order to test my code">

I've just begun trying to move an object up and down, but i can't seem to get the object to move. i know i'm missing something but i can't figure it out. I think it has to do with loading the transformed coordinates into a new buffer and displaying the contents from the buffer... but i don't know how to do that.

Here's my code:
<br />
Imports Tao.OpenGl<br />
Imports Tao.Platform<br />
Imports Tao.FreeGlut<br />
<br />
Public Class frmMainWin<br />
<br />
    Dim xTrans, yTrans, zTrans As Single<br />
<br />
    Private Sub frmMainWin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        myGlWindow.InitializeContexts()<br />
        myGlWindow.AutoSwapBuffers = True<br />
<br />
        'init glwindow<br />
        Gl.glClearColor(0.0F, 0.0F, 0.0F, 0.0F)<br />
<br />
        'Glu.gluLookAt(<br />
        Gl.glViewport(0, 0, 400, 300)<br />
        Gl.glMatrixMode(Gl.GL_PROJECTION)<br />
        Gl.glLoadIdentity()<br />
<br />
        Gl.glOrtho(0.0, 10.0, 0.0, 10.0, -10.0, 10.0)<br />
        Gl.glMatrixMode(Gl.GL_MODELVIEW)<br />
        Gl.glLoadIdentity()<br />
<br />
        xTrans = 0<br />
        yTrans = 0<br />
        zTrans = 0<br />
<br />
    End Sub<br />
<br />
    Private Sub myGlWindow_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles myGlWindow.Paint<br />
        Gl.glClear(Gl.GL_COLOR_BUFFER_BIT)<br />
<br />
        Gl.glColor3f(0.2F, 0.2F, 0.8F)<br />
<br />
        'Gl.glTranslatef(0.0F, 0.0F, 0.0F)<br />
        Gl.glTranslatef(xTrans, yTrans, zTrans)<br />
        Gl.glBegin(Gl.GL_TRIANGLES)     'Draw a triangle<br />
        Gl.glVertex3f(0.5F, 1.0F, 0.0F)<br />
        Gl.glVertex3f(0.0F, 0.0F, 0.0F)<br />
        Gl.glVertex3f(1.0F, 0.0F, 0.0F)<br />
        Gl.glEnd()<br />
<br />
    End Sub<br />
<br />
    Private Sub cmdUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUp.Click<br />
        'MsgBox("up")<br />
        yTrans = yTrans + 1<br />
<br />
        myGlWindow.SwapBuffers()<br />
<br />
    End Sub<br />
End Class<br />


Any help would be greatly appreciated.
Thanks
GeneralRe: OpenGL- Tao- VB.Net simulating motion and zoom [modified] Pin
Christoph Menge24-Feb-08 10:14
Christoph Menge24-Feb-08 10:14 
GeneralRe: OpenGL- Tao- VB.Net simulating motion and zoom Pin
braveheartkenya24-Feb-08 11:13
braveheartkenya24-Feb-08 11:13 
GeneralRe: OpenGL- Tao- VB.Net simulating motion and zoom Pin
Christoph Menge24-Feb-08 13:01
Christoph Menge24-Feb-08 13:01 
GeneralRe: OpenGL- Tao- VB.Net simulating motion and zoom Pin
braveheartkenya29-Feb-08 10:26
braveheartkenya29-Feb-08 10:26 
GeneralRe: OpenGL- Tao- VB.Net simulating motion and zoom Pin
Christoph Menge3-Mar-08 1:14
Christoph Menge3-Mar-08 1:14 
QuestionWhere did my "dshow.h" go? Pin
Jun Du23-Feb-08 3:53
Jun Du23-Feb-08 3:53 
AnswerRe: Where did my "dshow.h" go? Pin
Jun Du23-Feb-08 5:57
Jun Du23-Feb-08 5:57 
QuestionDoes Vista support managed DirectX out of the box? Pin
Dmitri Nеstеruk22-Feb-08 6:58
Dmitri Nеstеruk22-Feb-08 6:58 
QuestionSkin Detection Algorithm??? Pin
jamilkhan00721-Feb-08 18:13
jamilkhan00721-Feb-08 18:13 
GeneralMPEG Video file Pin
roshihans20-Feb-08 18:11
roshihans20-Feb-08 18:11 
QuestionDirectX Wrapper DXSmith Pin
Dave Kent Bell19-Feb-08 11:29
Dave Kent Bell19-Feb-08 11:29 
Generalpleaseee help (texture mapping) Pin
naroqueen17-Feb-08 7:41
naroqueen17-Feb-08 7:41 
GeneralRe: pleaseee help (texture mapping) Pin
Gavin Williams18-Feb-08 5:14
Gavin Williams18-Feb-08 5:14 
GeneralRe: pleaseee help (texture mapping) Pin
naroqueen18-Feb-08 6:40
naroqueen18-Feb-08 6:40 
GeneralRe: pleaseee help (texture mapping) Pin
Pete O'Hanlon18-Feb-08 8:49
mvePete O'Hanlon18-Feb-08 8:49 
GeneralRe: pleaseee help (texture mapping) Pin
Chris Austin19-Feb-08 10:20
Chris Austin19-Feb-08 10:20 
Questionmesh picking using directx and c# .net Pin
selvarajanlatha13-Feb-08 2:53
selvarajanlatha13-Feb-08 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.