Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web_gl anysotropic filtering extension throwing exceptions #12408

Closed
DartBot opened this issue Aug 13, 2013 · 4 comments
Closed

web_gl anysotropic filtering extension throwing exceptions #12408

DartBot opened this issue Aug 13, 2013 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-webgl type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Aug 13, 2013

This issue was originally filed by everton.ma...@gmail.com


What steps will reproduce the problem?

  1. create web app with attached file
  2. run in dartium
  3. see exceptions

What is the expected output?
Clean run (no exception).

What do you see instead?
Exceptions:

gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT):
throws exception: Class 'ExtTextureFilterAnisotropic' has no instance getter 'MAX_TEXTURE_MAX_ANISOTROPY_EXT'. NoSuchMethodError : method not found: 'MAX_TEXTURE_MAX_ANISOTROPY_EXT' Receiver: Instance of 'ExtTextureFilterAnisotropic' Arguments: []
    
gl.texParameterf(RenderingContext.TEXTURE_2D, _extAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, _anisotropy):
throws exception: Class 'ExtTextureFilterAnisotropic' has no instance getter 'TEXTURE_MAX_ANISOTROPY_EXT'. NoSuchMethodError : method not found: 'TEXTURE_MAX_ANISOTROPY_EXT' Receiver: Instance of 'ExtTextureFilterAnisotropic' Arguments: []

gl.getTexParameter(RenderingContext.TEXTURE_2D, _extAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT):
throws exception: Class 'ExtTextureFilterAnisotropic' has no instance getter 'TEXTURE_MAX_ANISOTROPY_EXT'. NoSuchMethodError : method not found: 'TEXTURE_MAX_ANISOTROPY_EXT' Receiver: Instance of 'ExtTextureFilterAnisotropic' Arguments: []

What version of the product are you using?
Dart Editor version 0.6.15_r25822
Dart SDK version 0.6.15.3_r25822

On what operating system?
Windows 7 on 64-bit


Attachment:
anisotropy.dart (2.83 KB)

@anders-sandholm
Copy link
Contributor

Added Area-Library, Library-WebGl, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Aug 13, 2013

This comment was originally written by everton.ma...@gmail.com


I fixed my code by replacing ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT with ExtTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT.

I've attached a working version of the test program.

Sorry for the confusion.

@DartBot
Copy link
Author

DartBot commented Sep 8, 2013

This comment was originally written by everton.ma...@gmail.com


I am attaching a fixed test case that throws exception only when combining dart2js -c + Firefox.

Summary:
Dartium = ok
dart2js = ok
dart2js -c + chrome = ok
dart2js -c + firefox = EXCEPTION

The exception is:

gl.getExtension('EXT_texture_filter_anisotropic'): exception: type 'UnknownJavaScriptObject' is not a subtype of type 'ExtTextureFilterAnisotropic'

How to reproduce:

  1. create a web app with the attached anisotropy.dart
  2. compile to javascript with dart2js -c
  3. open in firefox -- you will see the exception

Which system?
Dart Editor version 0.1.2_r27277
Dart SDK version 0.1.2.0_r27277
64-bit Windows 7
Firefox 23.0.1


Attachment:
anisotropy.dart (2.95 KB)

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-webgl labels Sep 8, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@terrylucas
Copy link
Contributor

These constants are static not instance members e.g.,

MAX_TEXTURE_MAX_ANISOTROPY_EXT

not ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT
but

class ExtTextureFilterAnisotropic extends Interceptor {
...
  static const int MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;

  static const int TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
...
}

So use, ExtTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-webgl type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants