Search the Community

Showing results for tags 'OpenCL'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • News

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Audio Jobs
  • Business Jobs
  • Game Design Jobs
  • Programming Jobs
  • Visual Arts Jobs

Categories

  • GameDev Unboxed

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Topical
    • Virtual and Augmented Reality
    • News
  • Community
    • GameDev Challenges
    • For Beginners
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams

Blogs

There are no results to display.

There are no results to display.

Marker Groups

  • Members

Group


About Me


Website


Industry Role


Twitter


Github


Twitch


Steam

Found 2 results

  1. I have strip the code down to barest minimum for clarity With the window up and draw rendering correctly, I set the key press to take the 'x' key, but when I press 'x' and print anywhere (and everywhere) to test, nothing prints to console. I scrutinised to see why, but I can't find what is missing. Can anyone see why its not working? Thanks public class PuzzleG extends JFrame implements GLEventListener, KeyListener { private static final long serialVersionUID = 1L; final private int width = 800; final private int height = 600; int numOfUnits; GLU glu= new GLU(); List<ObjVertices> dataArray; public PuzzleG( int units, List<ObjVertices> vertXYZ ) { super(" Puzzle game "); Globals.camera = new Point3D(0.0f, 1.4f, 0.0f); Globals.view = new Point3D(0.0f, -1.0f, -3.0f); GLProfile profile = GLProfile.get(GLProfile.GL2); GLCapabilities capabilities = new GLCapabilities(profile); GLCanvas canvas = new GLCanvas(capabilities); canvas.addGLEventListener(this); this.setName("Minimal OpenGL"); this.getContentPane().add(canvas); this.setSize(width, height); this.setLocationRelativeTo(null); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); this.setResizable(false); dataArray = vertXYZ; numOfUnits = units; canvas.requestFocusInWindow(); } public void play() { } @Override public void display(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glLoadIdentity(); glu.gluLookAt( Globals.camera.x, Globals.camera.y, Globals.camera.z, Globals.view.x, Globals.view.y, Globals.view.z, 0.0f, 1.0f, 0.0f); gl.glTranslatef(0.0f, 0.0f, -3.0f); gl.glBegin(GL.GL_LINE_LOOP); /*=========================== START =========================================================== ... draw object vertices ... ============================= end ============================================================ */ gl.glEnd(); gl.glFlush(); } @Override public void dispose(GLAutoDrawable drawable) { if( Globals.c == 'x')System.out.println(" 3333 "); } @Override public void init(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); gl.glClearDepthf(1.0f); gl.glEnable(GL2.GL_DEPTH_TEST); gl.glDepthFunc(GL2.GL_LEQUAL); gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST); gl.glShadeModel(GL2.GL_SMOOTH); gl.glEnableClientState(GL2.GL_VERTEX_ARRAY); if( Globals.c == 'x')System.out.println(" 1111 "); } @Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { GL2 gl = drawable.getGL().getGL2(); if (height == 0) height = 1; float aspect = (float)width / height; gl.glViewport(0, 0, width, height); gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective( 45, aspect, 0.1f, 100.0f); if( Globals.c == 'x')System.out.println(" 2222 "); } @Override public void keyPressed(KeyEvent e) { Globals.c = e.getKeyChar(); if( Globals.c == 'x'){ System.out.println(" 5555 "); } } @Override public void keyReleased(KeyEvent arg0) { // TODO Auto-generated method stub } @Override public void keyTyped(KeyEvent arg0) { // TODO Auto-generated method stub } } Just for the sake of checking I also tried the other key options as in the code below, but still didn't see any prints to console @Override public void keyReleased(KeyEvent e) { Globals.c = e.getKeyChar(); if( Globals.c == 'x'){ System.out.println(" 8888 "); } } @Override public void keyTyped(KeyEvent e) { Globals.c = e.getKeyChar(); if( Globals.c == 'x'){ System.out.println(" 7777 "); } }
  2. Hello, I'm making a graphical application for Mac OS. I've found several examples of how to create a context on Cocoa form, but all of them involve either NSOpenGlView, or custom view. The question is, is it possible to create a context directly on a window? I'm asking this mostly because of speed concerns, NSOpenGlView clearly renders to a buffer and then draws it on screen.